<template>
	<view>
		<phone-search-list :phones="phones" @paramClick="paramClick"></phone-search-list>
	</view>		
</template>

<script>
	
	import phoneSearchList from '@/components/phones/phone-search-list.vue'
	
	export default {
		name:"phone-search",
		components:{
			phoneSearchList
		},
		data() {
			return {
				phones:null,
			}
		},
		onLoad (option) {
			this.phones = JSON.parse(unescape(option.phones))
		},
		methods:{
			paramClick (e) {
				
				uni.navigateBack({
				    delta: 2
				});
				this.$eventHub.$emit('fire',[e.id,e.name]);
				
				/*uni.request({
					url: this.websiteUrl+'/api.php/Friends/tel',
					method: 'POST',
					header: {
						'content-type':'application/x-www-form-urlencoded',						
					},
					data: {id:e.id},
					success: res => {
						if(res.data.code == 1){
							uni.makePhoneCall({
								phoneNumber:res.data.data
							})						
						}																	
					},					
				});	*/
				
				
				
				
				
				
			}
		}
	}
</script>

<style>
	
</style>
